
perf = typeof perf == "undefined" ? {} : perf ;
perf.logger = parent && parent.perf.logger ? parent.perf.logger : {
  executed : function( event ) {},
  start : function( event ) { return function(){} }
};
perf.observe = function( element, event, handler ){
  if (element.addEventListener) {
    element.addEventListener(event, handler, true);
  } else {
    element.attachEvent("on" + event, handler);
  }
}
perf.observe( window, "load", function(){ 
  perf.logger.executed("loaded");
});
perf.observe( window, "DOMContentLoaded", function(){ 
  perf.logger.executed("DOMContentLoaded");
});